Vibhav Pant [Sun, 5 Feb 2017 16:18:27 +0000 (21:48 +0530)]
; bytecomp.el (-inline-lapcode): Fix incorrect parenthesis, refactor
Vibhav Pant [Sun, 5 Feb 2017 13:53:53 +0000 (19:23 +0530)]
bytecomp.el: Inline lapcode containing `byte-switch' correctly.
* lisp/emacs-lisp/bytecomp.el (byte-compile-inline-lapcode):
Restore value of byte-compile-depth after emitting a jump to a tag
in a jump table, or default/done tags.
Set the depth of final tags for byte-switch to nil after emitting
any jumps to them.
Vibhav Pant [Sun, 5 Feb 2017 13:25:45 +0000 (18:55 +0530)]
; * byte-opt.el (byte-decompile-bytecode-1): Add more documentation.
Vibhav Pant [Sun, 5 Feb 2017 13:19:24 +0000 (18:49 +0530)]
byte-opt.el: Replace jump tables while decompiling correctly.
* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
Don't make a copy of the constant vector, as it isn't used with
the decompiled lapcode.
Make sure that the correct lapcode pair/list is being modified while
replacing the jump table.
Vibhav Pant [Sun, 5 Feb 2017 10:07:43 +0000 (15:37 +0530)]
bytecomp.el: Don't store non-keyword symbols in jump-tables.
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-valid-obj2-p) return
nil when OBJ is a non-keyword symbol (i.e a variable), as the jump
table can only be used when comparing variables with constant values.
Vibhav Pant [Fri, 3 Feb 2017 17:53:28 +0000 (23:23 +0530)]
Revert "Use maphash instead of cl-loop."
This reverts commit
bfa88520136dd6b187ba101e6db5a5f8f0d5e874.
Vibhav Pant [Wed, 1 Feb 2017 12:45:59 +0000 (18:15 +0530)]
Use maphash instead of cl-loop.
* lisp/emacs-lisp/bytecomp.el: (byte-compile-lapcode) Use maphash
instead of cl-loop
Vibhav Pant [Mon, 30 Jan 2017 13:52:09 +0000 (19:22 +0530)]
* lisp/emacs-lisp/bytecomp.el: Create jump tables with :purecopy t
Vibhav Pant [Mon, 30 Jan 2017 13:05:43 +0000 (18:35 +0530)]
Merge remote-tracking branch 'origin/master' into feature/byte-switch
Vibhav Pant [Mon, 30 Jan 2017 06:33:23 +0000 (12:03 +0530)]
Fix hash tables not being purified correctly.
* src/alloc.c
(purecopy_hash_table) New function, makes a copy of the given hash
table in pure storage.
Add new struct `pinned_object' and `pinned_objects' linked list for
pinning objects.
(Fpurecopy) Allow purifying hash tables
(purecopy) Pin hash tables that are either weak or not declared with
`:purecopy t`, use purecopy_hash_table otherwise.
(marked_pinned_objects) New function, marks all objects in pinned_objects.
(garbage_collect_1) Use it. Mark all pinned objects before sweeping.
* src/lisp.h Add new field `pure' to struct `Lisp_Hash_Table'.
* src/fns.c: Add `purecopy' parameter to hash tables.
(Fmake_hash_table): Check for a `:purecopy PURECOPY' argument, pass it
to make_hash_table.
(make_hash_table): Add `pure' parameter, set h->pure to it.
(Fclrhash, Fremhash, Fputhash): Enforce that the table is impure with
CHECK_IMPURE.
* src/lread.c: (read1) Parse for `purecopy' parameter while reading
hash tables.
* src/print.c: (print_object) add the `purecopy' parameter while
printing hash tables.
* src/category.c, src/emacs-module.c, src/image.c, src/profiler.c,
src/xterm.c: Use new (make_hash_table).
Dmitry Gutov [Sun, 29 Jan 2017 08:41:32 +0000 (10:41 +0200)]
Escape dash in xref rgrep regexp
* lisp/progmodes/xref.el (xref-collect-matches): Escape dash
in REGEXP if it's the first character.
Dmitry Gutov [Sun, 29 Jan 2017 08:39:55 +0000 (10:39 +0200)]
Say JavaScript, not Javascript
* lisp/progmodes/js.el (js-mode-map, js-syntax-propertize)
(js-js-error, js-eval, js-set-js-context)
(js--get-js-context):
Refer to the language consistently as JavaScript.
Juanma Barranquero [Sun, 29 Jan 2017 18:34:35 +0000 (19:34 +0100)]
lisp/*.el: Fix some warnings
* lisp/battery.el (dbus-get-property):
* lisp/dired-aux.el (format-spec): Declare function.
* lisp/net/zeroconf.el (zeroconf-list-service-names)
(zeroconf-list-service-types, zeroconf-list-services):
Mark unused lexical arg.
* lisp/progmodes/hideshow.el (hs-hide-block-at-point):
* lisp/progmodes/sql.el (sql-end-of-statement):
Pass LIMIT to 'looking-back'.
Noam Postavsky [Sat, 28 Jan 2017 17:31:28 +0000 (12:31 -0500)]
Don't warn about obsolete defgenerics when defining them
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): The declaration code
should run after the definition code (Bug#25556).
Tino Calancha [Sun, 29 Jan 2017 09:49:10 +0000 (18:49 +0900)]
Fix Bug#25524
* lisp/vc/diff-mode.el (diff-beginning-of-hunk):
Return position at the beginning off the hunk.
(diff-file-junk-re): Add SVN keywords.
Stephen Berman [Sat, 28 Jan 2017 19:49:19 +0000 (20:49 +0100)]
hl-line.el: Don't try to operate on a killed buffer
* lisp/hl-line.el (hl-line-maybe-unhighlight): Examine only
live buffers (bug#25522).
Mark Oteiza [Sat, 28 Jan 2017 17:06:41 +0000 (12:06 -0500)]
Use access-file in EWW to check before downloading a file
* lisp/net/eww.el (eww-download): Check accessibility of
eww-download-directory to prevent starting a download that will fail
to write.
* src/fileio.c (Faccess_file): Clarify the use of string argument in
the docstring.
Yuri D'Elia [Sat, 28 Jan 2017 14:20:54 +0000 (15:20 +0100)]
Subject: Check Bcc after the Messag hook has run
* lisp/gnus/message.el (message-send): If the hook modifies
the message (mml tags or headers), we should check bcc on the
final message, not on the original.
Juanma Barranquero [Sat, 28 Jan 2017 03:40:36 +0000 (04:40 +0100)]
test/*.el: Avoid byte-compiler warnings
* test/lisp/abbrev-tests.el (abbrev-table-p-test): Remove unused 'let*'.
* test/lisp/faces-tests.el (faces--test): New customization group.
(faces--test1, faces--test2): Use it.
* test/lisp/ffap-tests.el (ffap-tests-25243):
Call 'mark-whole-buffer' interactively.
* test/lisp/ibuffer-tests.el (ibuffer-filter-groups, ibuffer-filtering-alist)
(ibuffer-filtering-qualifiers, ibuffer-save-with-custom)
(ibuffer-saved-filter-groups, ibuffer-saved-filters): Defvar.
(ibuffer-format-qualifier, ibuffer-unary-operand): Declare.
* test/lisp/minibuffer-tests.el (completion-test1):
Mark unused lexical arguments.
* test/lisp/simple-tests.el (simple-test--dummy-buffer): Wrap result in
'with-no-warnings' to avoid them when the macro is invoked for effect.
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-count-test):
Mark unused lexical arguments.
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-surface-test):
Mark unused lexical arguments.
(let-alist-cons): Remove unused let binding.
* test/lisp/net/dbus-tests.el (dbus-debug): Defvar.
(dbus-get-unique-name): Declare.
* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid):
Call 'font-lock-fontify-buffer' interactively.
* test/lisp/textmodes/tildify-tests.el (tildify-space-undo-test--test):
Mark unused lexical argument.
Eli Zaretskii [Fri, 27 Jan 2017 19:58:10 +0000 (21:58 +0200)]
Restore a test that was removed by a recent commit
* src/fileio.c (Ffile_accessible_directory_p): Don't overwrite the
errno value unless it's necessary. (Bug#25419)
Mark Oteiza [Fri, 27 Jan 2017 18:09:01 +0000 (13:09 -0500)]
Fix a couple eww customization types
* lisp/new/eww.el (eww-download-directory, eww-bookmarks-directory):
Change customization type to "directory".
Philipp Stephani [Tue, 17 Jan 2017 17:24:29 +0000 (18:24 +0100)]
Don't require a shell when loading htmlfontify
* lisp/htmlfontify.el (hfy-which-etags): Don't call a shell for
detecting the etags version (Bug#25468).
* test/lisp/htmlfontify-tests.el (htmlfontify-bug25468): Add unit
test.
Paul Eggert [Fri, 27 Jan 2017 16:56:34 +0000 (08:56 -0800)]
Slightly tune file-accessible-directory-p fix
* src/fileio.c (Ffile_accessible_directory_p):
Remove unnecessary test (Bug#25419).
Arash Esbati [Thu, 26 Jan 2017 19:25:16 +0000 (20:25 +0100)]
Add \citetitle to biblatex cite format
* lisp/textmodes/reftex-vars.el (reftex-cite-format-builtin): Add
\citetitle[*] to `reftex-cite-format' and bind them to keys i/I
per user request
http://lists.gnu.org/archive/html/auctex/2017-01/msg00049.html.
Lars Ingebrigtsen [Fri, 27 Jan 2017 12:53:47 +0000 (13:53 +0100)]
Fix charsets and encodings from non-file MIME parts
* lisp/gnus/mml.el (mml-generate-mime-1): Get the charsets and
encoding right for parts that do not originate from files.
Eli Zaretskii [Fri, 27 Jan 2017 10:27:50 +0000 (12:27 +0200)]
Fix 'describe-variable' for longish variable values
* lisp/help-fns.el (describe-variable): Don't accidentally remove
the last character of a variable's value. (Bug#25545)
Eli Zaretskii [Fri, 27 Jan 2017 09:39:31 +0000 (11:39 +0200)]
Ensure last line is at window bottom in shell buffers
* lisp/shell.el (shell-mode): Use setq-local. Set
scroll-conservatively to 101 locally. See the discussion at
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00736.html
for the reasons.
Michael Hoffman [Fri, 27 Jan 2017 09:26:36 +0000 (11:26 +0200)]
Support Bash Ctrl-Z indication of directory name in term.el
* term.el (term-emulate-terminal): Do not display ?\032 escape
codes even when 'handled-ansi-message' is non-nil. (Bug#11919)
Copyright-paperwork-exempt: yes
Eli Zaretskii [Fri, 27 Jan 2017 08:51:53 +0000 (10:51 +0200)]
Don't report zero errno for inaccessible directory
* src/fileio.c (Ffile_accessible_directory_p): Report EACCES when
a file handler reports a failure. (Bug#25419)
Eli Zaretskii [Fri, 27 Jan 2017 08:28:15 +0000 (10:28 +0200)]
Fix filenotify-tests on MS-Windows
* test/lisp/filenotify-tests.el (file-notify-test04-file-validity)
(file-notify-test05-dir-validity)
(file-notify-test06-many-events)
(file-notify-test08-watched-file-in-watched-dir): Manually remove
the watch descriptor before calling file-notify--test-cleanup-p.
(Bug#25539)
Hong Xu [Tue, 13 Dec 2016 01:55:25 +0000 (17:55 -0800)]
python-mode: Fix detection for opening blocks.
* python.el (python-info-dedenter-opening-block-positions): There
can't be any back-indented lines between an opening block and the
current line.
* python-tests.el (python-indent-electric-colon-4): Add an indent
test case where there is one-more indented previous opening block.
Lars Ingebrigtsen [Fri, 27 Jan 2017 00:04:59 +0000 (01:04 +0100)]
Fix Message check for bogus domain names
* lisp/gnus/message.el (message-make-fqdn): Fix check for
bogus system names (bug#24570).
Øyvind Stegard [Fri, 27 Jan 2017 00:02:23 +0000 (01:02 +0100)]
Subject: Restore correct Gnus newsgroup name after sending message
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Set the value of
gnus-newsgroup-name in the correct buffer (bug#24329).
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Thu, 26 Jan 2017 23:33:03 +0000 (00:33 +0100)]
Mention the new Gnus sorting command
Lars Ingebrigtsen [Thu, 26 Jan 2017 23:29:20 +0000 (00:29 +0100)]
Don't try to find charsets of non-text MIME parts
* lisp/gnus/mml.el (mml-generate-mime-1): It seems nonsensical
to try to determine the charset of non-text message parts, so
skip that (bug#24190). This will also remove messages like
"bunzip2ing /tmp/acsb.cpio.bz2...done" while sending messages
if you include such files.
Lars Ingebrigtsen [Thu, 26 Jan 2017 23:03:41 +0000 (00:03 +0100)]
Add new command gnus-article-sort-by-marks
* doc/misc/gnus.texi (Summary Sorting): Mention
gnus-summary-sort-by-marks.
* lisp/gnus/gnus-sum.el (gnus-article-sort-by-marks): New
function (bug#23393).
(gnus-thread-sort-by-marks): Ditto.
(gnus-summary-sort-by-mark): New command suggested by Dan Jacobson.
(gnus-summary-mode-map): Add keystroke.
(gnus-summary-make-menu-bar): Add to menu.
Katsumi Yamaoka [Thu, 26 Jan 2017 22:43:31 +0000 (22:43 +0000)]
Make `C-h b' work correctly in Gnus article buffer (bug#18257)
* lisp/gnus/gnus-art.el (gnus-article-describe-bindings):
Ignore summary commands that aren't bound to
gnus-article-read-summary-keys keys (bug#18257).
Lars Ingebrigtsen [Thu, 26 Jan 2017 22:11:50 +0000 (23:11 +0100)]
Fix crossposting in non-primary groups
* lisp/gnus/message.el
(message-cross-post-followup-to-header): Gnus server prefixes
shouldn't be included in the group names (bug#21661).
(message-cross-post-followup-to): Ditto.
Lars Ingebrigtsen [Thu, 26 Jan 2017 22:00:24 +0000 (23:00 +0100)]
Gnus doc clarification
* doc/misc/gnus.texi (Unavailable Servers): Explicitly say
that "unreachable" is the same as disabling it (bug#21630).
Lars Ingebrigtsen [Thu, 26 Jan 2017 21:52:16 +0000 (22:52 +0100)]
Remove dead code from rfc2047
* lisp/mail/rfc2047.el (rfc2047-fold-field): Remove dead code.
It's been disabled since 2005, when I made the change with the
following comment.
(rfc2047-encode-message-header): Disabled header folding -- not
all headers can be folded, and this should be done by the message
composition mode. Probably. I think.
Lars Ingebrigtsen [Thu, 26 Jan 2017 21:51:19 +0000 (22:51 +0100)]
Fill too long mail headers
* lisp/gnus/message.el (message--fold-long-headers): New
function to fold too-long headers (bug#21608).
(message-send-mail): Use it to fill headers longer than 998
characters (which is the protocol limit).
Lars Ingebrigtsen [Thu, 26 Jan 2017 21:28:17 +0000 (22:28 +0100)]
Make nndoc more resilient against corrupted files
* lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): Don't bug
out on invalid files, like invalid .gz files (bug#21538).
This may hinder Gnus from starting up.
Lars Ingebrigtsen [Thu, 26 Jan 2017 20:38:40 +0000 (21:38 +0100)]
Respect buffer-local message-fcc-handler-function
* lisp/gnus/message.el (message-do-fcc): Copy the local
variables from the Message buffer so that local settings of
`message-fcc-handler-function' etc are respected (bug#21174).
Lars Ingebrigtsen [Thu, 26 Jan 2017 20:35:58 +0000 (21:35 +0100)]
(message-do-fcc): Modernise the code slightly.
* lisp/gnus/message.el (message-do-fcc): Modernise the code slightly.
Lars Ingebrigtsen [Thu, 26 Jan 2017 20:12:05 +0000 (21:12 +0100)]
Avoid a regexp overflow in message-goto-body
* lisp/gnus/message.el (message-goto-body-1): Avoid using a
complicated backtracking regexp, because they may overflow on
large headers (bug#21160).
Lars Ingebrigtsen [Thu, 26 Jan 2017 20:04:00 +0000 (21:04 +0100)]
Refactor message-goto-body
* lisp/gnus/message.el (message-goto-body-1): Refactor out for reuse.
Lars Ingebrigtsen [Thu, 26 Jan 2017 18:45:39 +0000 (19:45 +0100)]
Fix typo in last checkin
* lisp/gnus/nnimap.el (nnimap-shell-program): Document
nnimap-shell-program (bug#20651).
Lars Ingebrigtsen [Thu, 26 Jan 2017 18:44:01 +0000 (19:44 +0100)]
Document nnimap-shell-program
* lisp/gnus/nnimap.el (nnimap-shell-program): Document
nnimap-shell-program (bug#20651).
Lars Ingebrigtsen [Thu, 26 Jan 2017 18:41:56 +0000 (19:41 +0100)]
Document :shell-command in `make-network-process'
* doc/lispref/processes.texi (Network): Document :shell-command.
* lisp/net/network-stream.el (open-network-stream): Document
the :shell-command parameter (bug#20651).
Lars Ingebrigtsen [Thu, 26 Jan 2017 18:21:59 +0000 (19:21 +0100)]
Gnus doc clarification
* lisp/gnus/gnus-sum.el (gnus-summary-save-article): Mention
the gnus-prompt-before-saving variable (bug#20500).
Lars Ingebrigtsen [Thu, 26 Jan 2017 18:09:58 +0000 (19:09 +0100)]
Fix the previous mml patch better
* lisp/gnus/mml.el (mml-minibuffer-read-file): Fix the
previous patch in a better way (bug#20480).
Lars Ingebrigtsen [Thu, 26 Jan 2017 18:07:00 +0000 (19:07 +0100)]
Give a slight better error message in mml-minibuffer-read-file
* lisp/gnus/mml.el (mml-minibuffer-read-file): Give a slightly
better error message when the user enters nothing (bug#20480).
Mark Oteiza [Thu, 26 Jan 2017 18:12:54 +0000 (13:12 -0500)]
; Just use octal
* lisp/recentf.el (recentf-save-file-modes): Write file mode in octal.
Vibhav Pant [Thu, 26 Jan 2017 17:33:02 +0000 (23:03 +0530)]
* lisp/emacs-lisp/bytecomp.el:(bc-cond-jump-table-info)add docstring
Lars Ingebrigtsen [Thu, 26 Jan 2017 17:32:48 +0000 (18:32 +0100)]
Make eww buffers prettier in the buffer listing
* lisp/net/eww.el (eww-render): Put the currently visited URL
into the buffer listing (bug#23738).
(eww-render): Ditto.
Lars Ingebrigtsen [Thu, 26 Jan 2017 17:19:46 +0000 (18:19 +0100)]
Allow mml-attach-file to prompt less
* lisp/gnus/mml.el (mml-attach-file): If given a prefix, don't
prompt for type/description/disposition, but use defaults
(bug#19202).
Lars Ingebrigtsen [Thu, 26 Jan 2017 14:07:38 +0000 (15:07 +0100)]
Don't allow message-newline-and-reformat to be run outside the body
* lisp/gnus/message.el (message-newline-and-reformat): Error
out if run outside the body of a message (bug#18820).
Vibhav Pant [Thu, 26 Jan 2017 09:01:16 +0000 (14:31 +0530)]
* lisp/emacs-lisp/bytecomp.el: Use correct function to push nil
* lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Use
byte-compile-constant instead of byte-compile-form to push nil.
Vibhav Pant [Thu, 26 Jan 2017 08:58:23 +0000 (14:28 +0530)]
* lisp/emacs-lisp/disass.el: Fix spacing while showing jump tables
Paul Eggert [Thu, 26 Jan 2017 05:13:19 +0000 (21:13 -0800)]
Replace QUIT with maybe_quit
There’s no longer need to have QUIT stand for a slug of C statements.
Use the more-obvious function-call syntax instead.
Also, use true and false when setting immediate_quit.
These changes should not affect the generated machine code.
* src/lisp.h (QUIT): Remove. All uses replaced by maybe_quit.
Paul Eggert [Thu, 26 Jan 2017 04:27:45 +0000 (20:27 -0800)]
A quicker check for quit
On some microbenchmarks this lets Emacs run 60% faster on my
platform (AMD Phenom II X4 910e, Fedora 25 x86-64).
* src/atimer.c: Include keyboard.h, for pending_signals.
* src/editfns.c (Fcompare_buffer_substrings):
* src/fns.c (Fnthcdr, Fmemq, Fmemql, Fassq, Frassq, Fplist_put)
(Fnconc, Fplist_member):
Set and clear immediate_quit before and after loop instead of
executing QUIT each time through the loop. This is OK for loops
that affect only locals.
* src/eval.c (process_quit_flag): Now static.
(maybe_quit): New function, containing QUIT’s old body.
* src/fns.c (rarely_quit): New function.
(Fmember, Fassoc, Frassoc, Fdelete, Fnreverse, Freverse)
(Flax_plist_get, Flax_plist_put, internal_equal, Fnconc):
Use it instead of QUIT, for
speed in tight loops that might modify non-locals.
* src/keyboard.h (pending_signals, process_pending_signals):
These belong to keyboard.c, so move them here ...
* src/lisp.h: ... from here.
(QUIT): Redefine in terms of the new maybe_quit function, which
contains this macro’s old definiens. This works well with branch
prediction on processors with return stack buffers, e.g., x86
other than the original Pentium.
Paul Eggert [Thu, 26 Jan 2017 03:07:57 +0000 (19:07 -0800)]
Simplify make-list implementation
* src/alloc.c (Fmake_list): Don’t unroll loop, as the complexity
is not worth it these days.
Mark Oteiza [Thu, 26 Jan 2017 02:34:46 +0000 (21:34 -0500)]
Make use of cl-loop destructuring
* lisp/progmodes/js.el (js--get-tabs): Replace extraneous bits with
destructuring.
(with-js): Add declare forms.
Lars Ingebrigtsen [Wed, 25 Jan 2017 21:53:07 +0000 (22:53 +0100)]
Revert "Bind C-c keys in the article buffer"
This reverts commit
6b4195f2ace1f6328c5a833fde40f39babef4fa6.
The commit somehow lead to problems in other parts of Emacs.
Eli Zaretskii [Wed, 25 Jan 2017 20:49:35 +0000 (22:49 +0200)]
; * doc/lispref/lists.texi (List Elements): Fix last change.
Lars Ingebrigtsen [Wed, 25 Jan 2017 20:47:28 +0000 (21:47 +0100)]
Document how to quote MML tags
* doc/misc/emacs-mime.texi (MML Definition): Mention how to
quote MML tags (bug#18881).
Lars Ingebrigtsen [Wed, 25 Jan 2017 20:21:40 +0000 (21:21 +0100)]
Make address parsing more robust
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't
bug out on addresses like
(ietf-drums-parse-address "\"Foo \"bar\" <larsi@gnus.org>")
(bug#18572).
Lars Ingebrigtsen [Wed, 25 Jan 2017 19:57:52 +0000 (20:57 +0100)]
Fix the %P (line number) thing in Gnus summary buffers
* lisp/gnus/gnus-salt.el (gnus-pick-line-number): Remove hack.
* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Reset the
"pick" mode line number on entry instead of relying in a hack (bug#18311).
Lars Ingebrigtsen [Wed, 25 Jan 2017 19:43:27 +0000 (20:43 +0100)]
Fix wrong documentation on nnmairix keystrokes
* doc/misc/gnus.texi (nnmairix keyboard shortcuts): The
nnmairix commands are on G G, not $ (bug#18260).
Lars Ingebrigtsen [Wed, 25 Jan 2017 19:40:27 +0000 (20:40 +0100)]
Bind C-c keys in the article buffer
* lisp/gnus/gnus-art.el (gnus-article-mode-map): Also bind the
C-c keys so that they execute in the summary buffer
(bug#18257). This makes commands like `C-c C-f' work from the
article buffer.
Lars Ingebrigtsen [Wed, 25 Jan 2017 19:30:44 +0000 (20:30 +0100)]
Don't mark articles in Gnus as displayed when they aren't
* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Don't
mark any articles as selected if we're not selecting any
articles (bug#18255).
Vibhav Pant [Wed, 25 Jan 2017 19:32:16 +0000 (01:02 +0530)]
* lisp/emacs-lisp/disass.el: Display jump tables for switch.
Vibhav Pant [Wed, 25 Jan 2017 19:30:41 +0000 (01:00 +0530)]
* lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table
Vibhav Pant [Wed, 25 Jan 2017 19:28:36 +0000 (00:58 +0530)]
* lisp/emacs-lisp/bytecomp.el: Simplify b-c-cond-valid-obj2-p
Vibhav Pant [Wed, 25 Jan 2017 19:27:10 +0000 (00:57 +0530)]
* lisp/emacs-lisp/bytecomp.el: Fix byte-switch codegen with symbols.
Vibhav Pant [Wed, 25 Jan 2017 19:24:59 +0000 (00:54 +0530)]
* lisp/emacs-lisp/byte-opt.el: Add support for decompiling switch
* lisp/emacs-lisp/byte-opt.el: (byte-decompile-bytecode-1) When the
constant encountered precedes a byte-switch op, replace all the
addresses in the jump table with tags.
Mark Oteiza [Wed, 25 Jan 2017 19:21:10 +0000 (14:21 -0500)]
Move cXXXr and cXXXXr to subr.el
* etc/NEWS: Mention new core Elisp.
* doc/lispref/lists.texi (List Elements): Document and index the new
functions.
* doc/misc/cl.texi (List Functions): Change "defines" to "aliases".
* lisp/subr.el (caaar, caadr, cadar, caddr, cdaar, cdadr, cddar)
(cdddr, caaaar caaadr, caadar, caaddr, cadaar, cadadr, caddar):
(cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar):
(cddddr): New functions.
* lisp/emacs-lisp/cl-lib.el (cl-caaar, cl-caadr, cl-cadar, cl-caddr):
(cl-cdaar, cl-cdadr, cl-cddar cl-cdddr, cl-caaaar cl-caaadr):
(cl-caadar, cl-caaddr, cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr):
(cl-cdaaar, cl-cdaadr, cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr):
(cl-cdddar, cl-cddddr): Alias to new subr functions.
* lisp/emacs-lisp/cl.el (cl-unload-function): Remove cXXXr and cXXXXr
elements.
Lars Ingebrigtsen [Wed, 25 Jan 2017 18:30:33 +0000 (19:30 +0100)]
Only save .newsrc file if the native method is NNTP
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
the .newsrc file if the native select method is NNTP
(bug#18198). This avoids problems with invalid IMAP group
names and the like in the .newsrc file.
Lars Ingebrigtsen [Wed, 25 Jan 2017 18:30:22 +0000 (19:30 +0100)]
Only save .newsrc file if the native method is NNTP
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
the .newsrc file if the native select method is NNTP
(bug#18198). This avoids problems with invalid IMAP group
names and the like in the .newsrc file.
Lars Ingebrigtsen [Wed, 25 Jan 2017 17:31:42 +0000 (18:31 +0100)]
Gnus custom spec fix
* lisp/gnus/gnus-art.el (gnus-signature-limit): Fix customize
spec to match the doc string (bug#17679).
Lars Ingebrigtsen [Wed, 25 Jan 2017 17:27:33 +0000 (18:27 +0100)]
Clarify confusing Gnus error message
* lisp/gnus/gnus-topic.el (gnus-topic-unindent): Clarify
confusing error message (bug#17677).
Lars Ingebrigtsen [Wed, 25 Jan 2017 17:14:00 +0000 (18:14 +0100)]
Make C-u C-x m work with Message as documented
* lisp/gnus/message.el (message-mail): Respect the CONTINUE
parameter (bug#17175).
Lars Ingebrigtsen [Wed, 25 Jan 2017 16:43:44 +0000 (17:43 +0100)]
Fix problem with auto-mode and dir-locals-collect-variables
* lisp/files.el (dir-locals-collect-variables): When run from
auto-mode, the file in question may not be an absolute path
name (bug#24016).
Example backtrace:
Debugger entered--Lisp error: (args-out-of-range "compile-1st-in-loa
dir-locals-collect-variables(((emacs-lisp-mode (indent-tabs-mode))
hack-dir-local-variables()
hack-local-variables(no-mode)
run-mode-hooks(diff-mode-hook)
diff-mode()
mm-display-inline-fontify((#<buffer *mm*-923037> ("text/x-diff" (
Lars Ingebrigtsen [Wed, 25 Jan 2017 16:28:17 +0000 (17:28 +0100)]
Attach text files correctly in Message
* lisp/gnus/mml.el (mml-generate-mime-1): Detect which coding
system has been used in attached text files, and don't try to
do any encoding of these files (bug#13808).
Lars Ingebrigtsen [Wed, 25 Jan 2017 13:21:13 +0000 (14:21 +0100)]
Build fix for older gnutls versions
* src/gnutls.c (emacs_gnutls_handle_error):
GNUTLS_E_PREMATURE_TERMINATION is apparently only present in
gnutls-3.
Tino Calancha [Wed, 25 Jan 2017 06:15:16 +0000 (15:15 +0900)]
ediff-difference-vector-alist: Drop duplicated definition
* lisp/vc/ediff-init.el (ediff-difference-vector-alist):
Drop duplicated definition.
(ediff-difference-vector-A, ediff-difference-vector-B)
(ediff-difference-vector-C, ediff-difference-vector-Ancestor):
Move definition before 'ediff-difference-vector-alist'.
Lars Ingebrigtsen [Wed, 25 Jan 2017 00:18:43 +0000 (01:18 +0100)]
Revert "nnimap.el: support additional expunge options"
This reverts commit
4e9baea6aba1633074889339dcc7cdc9d73880d3.
The patch broke fetching new mail:
Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type")
format("%d .*\n" (t ("OK" ("HIGHESTMODSEQ" "914696") "Expunge" "completed.") ("VANISHED" "
1825937") ("0" "RECENT")))
(looking-at (format "%d .*\n" sequence))
(not (looking-at (format "%d .*\n" sequence)))
(progn (while (and (not (bobp)) (progn (forward-line -1) (looking-at "\\*\\|[0-9]+ OK NOOP")))) (not (looking-at (format "%d .*\n" sequence))))
Nikolaus Rath [Tue, 24 Jan 2017 23:46:13 +0000 (00:46 +0100)]
nnimap.el: support additional expunge options
* lisp/gnus/nnimap.el (nnimap-close-group)
(nnimap-request-expire-articles, nnimap-delete-article)
(nnimap-request-scan): add new 'never, 'immediate, and 'on-exit
settings for nnimap-expunge (bug#20670).
Lars Ingebrigtsen [Tue, 24 Jan 2017 23:29:24 +0000 (00:29 +0100)]
Don't tag Gnus bugs with "gnus"
* lisp/gnus/gnus-msg.el (gnus-bug): Remove the bug package tags.
* lisp/gnus/gnus.el (gnus-bug-package): Removed; Gnus doesn't
have its own package any more in the bug tracker.
Lars Ingebrigtsen [Tue, 24 Jan 2017 23:23:28 +0000 (00:23 +0100)]
Tweak TLS error messaging on closed connections
* src/gnutls.c (emacs_gnutls_handle_error): Demote the normal
peer-closed-connection "The TLS connection was non-properly
terminated" message to a lower level so that it isn't shown to
the user by default.
Lars Ingebrigtsen [Tue, 24 Jan 2017 22:39:05 +0000 (23:39 +0100)]
Avoid having eww unexpectedly open external browsers
* lisp/net/eww.el (eww-render): Instead of opening unsupported
content types like audio/mpeg directly in an external browser
(which can be very confusing especially when something
redirects to a file like that), just display a simple
interstitial that people can choose to click on or not
(bug#22671).
Lars Ingebrigtsen [Tue, 24 Jan 2017 21:40:57 +0000 (22:40 +0100)]
When opening new eww buffers, use buffer names based on the host name
* lisp/net/eww.el (eww-browse-url): When opening in a new
window, use a buffer name based on the host name (bug#23738).
(eww--dwim-expand-url): Refactored out into its own function
for easier reuse.
David Engster [Tue, 24 Jan 2017 21:47:53 +0000 (22:47 +0100)]
xml: Fix parsing of default namespace with quoted names
* lisp/xml.el (xml-parse-attlist): Properly extract namespace when
parsing is done with quoted symbol names (bug#23440).
* test/lisp/xml-tests.el (xml-parse-test--default-namespace-qnames)
(xml-parse-test-default-namespace-qnames): Test for the above.
Lars Ingebrigtsen [Tue, 24 Jan 2017 21:21:45 +0000 (22:21 +0100)]
Fix rendering of some complex SVG images
* lisp/net/shr.el (shr-parse-image-data): Don't transform
SVG->DOM->XML unless we're blocking images, as this is apt to
destroy the SVG (bug#24111).
Lars Ingebrigtsen [Tue, 24 Jan 2017 20:33:51 +0000 (21:33 +0100)]
Clarify the last clarification
* lisp/net/shr.el (shr-width): Clarify the interaction with
`shr-use-fonts' (bug#24928).
Lars Ingebrigtsen [Tue, 24 Jan 2017 20:31:17 +0000 (21:31 +0100)]
shr-width doc clarification
* lisp/net/shr.el (shr-width): Clarify the interaction with
`shr-use-fonts' (bug#24928).
Lars Ingebrigtsen [Tue, 24 Jan 2017 20:17:09 +0000 (21:17 +0100)]
Allow passing in max-width/height
* lisp/net/shr.el (shr-rescale-image): Allow passing in
max-width/height (bug#25287).
Stefan Monnier [Tue, 24 Jan 2017 16:31:11 +0000 (11:31 -0500)]
* lisp/progmodes/vhdl-mode.el: Avoid add-to-list on local vars
Require `cl' for `pushnew'.
(vhdl-scan-project-contents, vhdl-compose-wire-components)
(vhdl-uniquify): Use `pushnew' instead of `add-to-list'.
Noam Postavsky [Sun, 18 Dec 2016 05:00:30 +0000 (00:00 -0500)]
Fix comment detection on open parens
Characters having both open paren syntax and comment start syntax were
being detected as open parens even when they should have been part a
comment starter (Bug#24870).
* src/syntax.c (in_2char_comment_start): New function, extracted from
`scan_sexps_forward'.
(scan_sexps_forward): Add check for a 2-char comment starter before the
loop. Inside the loop, do that check after incrementing the 'from'
character index. Move the single char comment syntax cases into the
switch instead of special casing them before.
* test/src/syntax-tests.el (parse-partial-sexp-paren-comments):
(parse-partial-sexp-continue-over-comment-marker): New tests.
Alan Mackenzie [Mon, 23 Jan 2017 19:00:49 +0000 (19:00 +0000)]
Give , and .@ doc strings. Fixes bug #24561.
Also make *Help* links to ``' possible. Also make usable as such doc strings
on the function-documentation property of a symbol.
* lisp/emacs-lisp/backquote.el (top-level): Give , and '@ doc strings on the
function-documentation property. Also give these symbols a reader-construct
property.
* lisp/help-fns.el (describe-function): Allow the function-documentation
property to work. Use princ rather than prin1 to print the function's name
when it has a reader-construct property.
(help-fns-signature): Don't insert `high-usage' for a reader-construct.
(describe-function-1): Adapt to process documentation on the
function-documentation property. Print "a reader construct" when appropriate.
* lisp/help-mode.el (help-xref-symbol-regexp): Amend this regexp also to match
``'.